# -*- coding: UTF-8 -*-
__author__ = 'Jeffrey'

import copy



def login(func):
    def wrapper(*args, **kwargs):
        if args[0] == 1:
            print "success!"
            return func(*args, **kwargs)
        else:
            print "fail!"
    return wrapper

@login
def test(aId):
    print "aId:", aId

test(2)